package edu.hunau.cxb18.spring.aop.service.impl;

import edu.hunau.cxb18.spring.aop.service.UserService;

/**
 * @author hb
 * @create 2020-03-16 10:29
 */
public class UserServiceImpl implements UserService {
    @Override
    public void regist(String username, String pwd) {
        System.out.println("【目标方法】：注册用户");
    }

    public boolean login(String username,String pwd){
        System.out.println("【目标方法】：用户登录");
        if(2>1){
            throw new RuntimeException("故意抛出的一个异常!");
        }
        return true;
    }

    @Override
    public void deleteUserById(int id) {
        System.out.println("【目标方法】：根据id删除用户");
    }
}
